package actions;

import gui.Frame;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

/**
 * Creates a new action to take the user to their previous screen. 
 * 
 * @author Natalie
 *
 */
@SuppressWarnings("serial")
public class PreviousAction extends AbstractAction {
	
	private Frame myFrame;

	public PreviousAction(final Frame theFrame) {
		super("Previous");
		myFrame = theFrame;
	}
	
	/**
	 * Takes the user to their previous action. 
	 */
	@Override
	public void actionPerformed(final ActionEvent theEvent) {
		myFrame.getPreviousAction().actionPerformed(theEvent);

	}

}
